package com.lucker.service.sys;

import java.util.List;

import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;

import com.lucker.cds.model.CSysRestrictionsConfig;
import com.lucker.ds.mapper.BaseCustomMapper;
import com.lucker.ds.model.SysRestrictionsConfig;
import com.lucker.service.BaseServiceImpl;

@Service
public class SysRestrictionsConfigServiceImpl extends BaseServiceImpl<SysRestrictionsConfig, CSysRestrictionsConfig, Long> implements SysRestrictionsConfigService {
	
	public SysRestrictionsConfig getSysRestrictionsConfig(String type) {
		SysRestrictionsConfig _config = getSysRestrictionsConfigByCache(type);
		if(_config != null) {
			return _config;
		}
		
		SysRestrictionsConfig _sysRestrictionsConfig = new SysRestrictionsConfig();
		_sysRestrictionsConfig.setType(type);
		_sysRestrictionsConfig.setStatus(1);
		List<SysRestrictionsConfig> _list = this.queryAll(_sysRestrictionsConfig);
		if(!CollectionUtils.isEmpty(_list)) {
			return _list.get(0);
		}
		return null;
	}
	
	
	public SysRestrictionsConfig getSysRestrictionsConfigByCache(String type) {
		return null;
	
	}


	
	public BaseCustomMapper getCustomMapper(){
		return null;
	}
}
